package com.neo.push.core;

/**
 * Created by lock on 17-7-11.
 */
public class AbstractMessage implements Message {

    private int length;
    private MessageType type;
    private byte[] content;


    protected void setLength(int length) {
        this.length = length;
    }

    protected void setType(MessageType type) {
        this.type = type;
    }

    protected void setContent(byte[] content) {
        this.content = content;
    }

    @Override
    public int length() {
        return this.length;
    }

    @Override
    public short type() {
        return this.type.getCode();
    }

    @Override
    public byte[] content() {
        return this.content;
    }
}
